package com.bjpowernode.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class UserController {
    @RequestMapping(value = "expression")
    public String express(HttpServletRequest request,
                          Model model,Integer id){

        model.addAttribute("userName","sun");
        request.getSession().setAttribute("data","sessionData");
        return "index";
    }
}
